package com.jswdwsx.esign.service.dto

import com.jswdwsx.esign.cloud.enums.IdTypeEnum
import com.jswdwsx.esign.cloud.enums.IdentityTypeEnum
import com.jswdwsx.esign.cloud.enums.OrgIdTypeEnum
import com.jswdwsx.esign.cloud.request.MerchantInfoReq
import com.jswdwsx.esign.entity.RequestPO

data class CreateAccountDTO(
    var signerName: String? = null,
    var signerIdType: IdTypeEnum? = null,
    var signerIdNumber: String? = null,
    var signerMobile: String? = null,
    var identityType: IdentityTypeEnum,
    var orgName: String? = null,
    var orgIdType: OrgIdTypeEnum? = null,
    var orgIdNumber: String? = null
) {
    constructor(requestPO: RequestPO) : this(
        signerName = requestPO.signerName,
        signerIdType = requestPO.signerIdType,
        signerIdNumber = requestPO.signerIdNumber,
        signerMobile = requestPO.signerMobile,
        identityType = requestPO.identityType,
        orgName = requestPO.orgName,
        orgIdType = requestPO.orgIdType,
        orgIdNumber = requestPO.orgIdNumber
    )

    constructor(merchantInfoReq: MerchantInfoReq) : this(
        signerName = merchantInfoReq.signerName,
        signerIdType = merchantInfoReq.signerIdType,
        signerIdNumber = merchantInfoReq.signerIdNumber,
        signerMobile = merchantInfoReq.signerMobile,
        identityType = merchantInfoReq.identityType,
        orgName = merchantInfoReq.orgName,
        orgIdType = merchantInfoReq.orgIdType,
        orgIdNumber = merchantInfoReq.orgIdNumber
    )
}